from django.urls import path
from apps.users.views import UsernameCountView,RegisterView,LoginView,LogoutView
from apps.users.views import CenterView,EmailView,EmailVerifyView,CreateAddressView
from apps.users.views import AddressView,UpdateDestroyAddressView
from apps.users.views import DefaultAddressView,UpdateTitleAddressView
from apps.users.views import ChangePasswordView
urlpatterns = [
    #判断用户名是否重复
    path('usernames/<username:username>/count/',UsernameCountView.as_view()),
    path('register/',RegisterView.as_view()),
    path('login/',LoginView.as_view()),
    path('logout/',LogoutView.as_view()),
    path('info/',CenterView.as_view()),
    path('emails/',EmailView.as_view()),
    path('emails/verification/',EmailVerifyView.as_view()),
    path('addresses/create/',CreateAddressView.as_view()),
    path('addresses/',AddressView.as_view()),
    path('addresses/<id>/',UpdateDestroyAddressView.as_view()),
    path('addresses/<id>/default/',DefaultAddressView.as_view()),
    path('addresses/<id>/title/',UpdateTitleAddressView.as_view()),
    path('password/',ChangePasswordView.as_view()),
]